﻿<Window Name ="wMain" Loaded="wMain_Loaded"  x:Class="VMClusterManager.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converters="clr-namespace:VMClusterManager.Converters"
    Title="" Height="609" Width="807" Closed="wMain_Closed" Style="{StaticResource WindowStyle}" >
    <Window.Resources>
        <Thickness x:Key="5555" Top="5" Bottom="5" Left="5" Right="5"/>
       
    </Window.Resources>
    <Window.CommandBindings>
        <CommandBinding x:Name="AppExit" Command="ApplicationCommands.Close"
                        CanExecute="AppExit_CanExecute"
                        Executed="AppExit_Executed"
                        />
        <CommandBinding x:Name="AppHelp" Command="ApplicationCommands.Help"
                        CanExecute="AppHelp_CanExecute"
                        Executed="AppHelp_Executed"
                        />
    </Window.CommandBindings>
    <DockPanel>
        <Menu DockPanel.Dock="Top" HorizontalAlignment="Left" Margin="5,0,0,0" Background="{Binding ElementName=wMain, Path=Background}" FontSize="14">
            <MenuItem Header="File">
                <MenuItem Header="Exit" Command="ApplicationCommands.Close"/>
            </MenuItem>
            <MenuItem Header="Edit"/>
            <MenuItem Header="Actions"/>
            <MenuItem Header="Help">
                <MenuItem Name="mnuAbout" Header="About..." Click="mnuAbout_Click"/>
                <MenuItem Header="Online documenation..." Command="ApplicationCommands.Help" />
            </MenuItem>
        </Menu>
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="220" />
                <ColumnDefinition Width="332*" />
                <ColumnDefinition Width="160" />
            </Grid.ColumnDefinitions>
            <DockPanel Grid.Column="1"  Margin="5">
                <TextBlock Text="Details" DockPanel.Dock="Top" Margin="{StaticResource 5555}"></TextBlock>
                <Expander Header="Hosts" DockPanel.Dock="Top" BorderBrush="Black" BorderThickness="1" IsExpanded="{Binding HostListExpanded, Mode=TwoWay}">
                    <ContentControl Name="VMHosts" Content="{Binding HostListView}"/>
                </Expander>
                <Grid   Name="detailsPlaceholder" DockPanel.Dock="Top"
                                 x:FieldModifier="private"  
                                 >
                    <ContentControl Content="{Binding DetailsView}"/>
                </Grid>
            </DockPanel>

            <!--<StackPanel Grid.Row="2" Name="navigationMenu" x:FieldModifier="private" Margin="{StaticResource 5555}">
                <Button Width="Auto" HorizontalAlignment="Stretch"  Name="btnHosts" Click="btnHosts_Click">Hosts</Button>
                <Button Width="Auto" HorizontalAlignment="Stretch" Name="button1" Click="btnVM_Click" >Virtual Machines</Button>
                <Button Width="Auto" HorizontalAlignment="Stretch" Name="btnJobs" Click="btnTasks_Click">Jobs</Button>
            </StackPanel>-->
            <DockPanel Name="NavigationPanel" Margin="5" >
                <TextBlock Text="Navigation" DockPanel.Dock="Top" Margin="{StaticResource 5555}"/>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <ContentControl Name="vmHostTree" Grid.Row="0" Content="{Binding VMHostNavigationView}"/>
                    <GridSplitter 
            ResizeDirection="Rows"
            
            Grid.Row="1" 
            Width="Auto"
            Height="3"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            Margin="0"/>
                    <ContentControl Name="vmTree" Grid.Row="2" Content="{Binding VMNavigationView}"/>
                </Grid>
                
                <!--<ContentControl Name="navigationTree" DockPanel.Dock="Top" Content="{Binding NavigationView}"/>-->
           
        </DockPanel>
            <DockPanel Grid.Column="2" Margin="5">
                <TextBlock Text="Actions" DockPanel.Dock="Top" Margin="5"/>
                <ContentControl Name="HostCommands" DockPanel.Dock="Top" Content="{Binding VMHostTreeActionsView}" Margin="5"/>
                <ContentControl Name="actionMenu" DockPanel.Dock="Top" x:FieldModifier="private" Content="{Binding ActionsView}" Margin="5,5,5,0"/>
                <ContentControl x:Name="TreeCommands" DockPanel.Dock="Top" Content="{Binding TreeCommandsView}" Margin="5,0,5,5"/>
                <ContentControl Name="JobAndTaskCommands" DockPanel.Dock="Top" Content="{Binding JobAndTaskCommandsView}" Margin="5"/>
                
            </DockPanel>
            
        </Grid>

    </DockPanel>
    
</Window>
